<?php
	include_once(realpath(dirname(__FILE__)) . "/../../../../fonctions/authplugins.php");
	if (function_exists("autorisation")) autorisation("dc_newsletter_basic");
	include_once(realpath(dirname(__FILE__)) . "/../../../../classes/Client.class.php");
	header("Content-Type: application/csv-tab-delimited-table");
	header("Content-disposition: filename=export_client" . ".csv");

	$client = new Client();
	$query_client = "select * from $client->table";
	$resul_client = mysql_query($query_client, $client->link);

	while($row = mysql_fetch_object($resul_client)) {
		echo $row->email .";". $row->nom .";". $row->prenom . "\n";
	}
?>
